var ins=document.getElementById("insertEmp");
var listEmp=document.getElementById("listEmp");
var listEmpByCond=document.getElementById("listEmpByCond");
//var delOrMod=document.getElementsByName("delOrMod");

ins.addEventListener("click", function() {
		window.open("empInsertView.do","empInsertView","height=180,width=1000,left=200,top=200");
},false);

listEmp.addEventListener("click", function() {
	location.href="listEmp.do";
},false);

/*for (var i = 0,len=delOrMod.length ; i < len; i++) {
	delOrMod[i].addEventListener("click", function() {
		window.open("empDelOrModView.do","empDelOrModView","height=180,width=1000,left=200,top=200");
	},false);
}*/

function delOrMod(emp_id) {
	window.open("empDelOrModView.do?emp_id="+emp_id,"empInsertView","height=180,width=1000,left=200,top=200");
}
document.forms[0].addEventListener("submit", function(event) {
	var frm=document.forms[0];
	
	frm.elements["grad_sdate"].value=
			frm.elements["grad_stime_year"].value+frm.elements["grad_stime_month"].value+frm.elements["grad_stime_day"].value;
	frm.elements["grad_edate"].value=
			frm.elements["grad_etime_year"].value+frm.elements["grad_etime_month"].value+frm.elements["grad_etime_day"].value;
	

/*	if(frm.elements["grad_stime_year"].value >frm.elements["grad_etime_year"].value 
			|| frm.elements["grad_stime_month"].value >frm.elements["grad_etime_day"].value
			|| frm.elements["grad_stime_month"].value >frm.elements["grad_etime_day"].value){
			if(frm.elements["grad_etime_year"].value == '' || frm.elements["grad_etime_day"].value == ''
				|| frm.elements["grad_etime_day"].value == ''){
				return;
			}
		event.preventDefault();
		alert("시작날짜가 종료날짜보다 큽니다.");
		return;
	}*/
	if(frm.elements["grad_stime_year"].value > frm.elements["grad_etime_year"].value){
		if(frm.elements["grad_etime_year"].value == '' || frm.elements["grad_etime_day"].value == ''
			|| frm.elements["grad_etime_day"].value == ''){
			return;
		}
		event.preventDefault();
		alert("시작날짜가 종료날짜보다 큽니다.");
		return;
	}
}, false);

function searchEmp(page) {
	var frm=document.forms[1];
	frm.elements["page"].value=page;
	frm.submit();
}





